TANK_SELECTINPUT (<First Tank>, <Number of Tanks>, <Selection Rule>, <Minimum Level>, <Product Type>)
TANK_SELECTINPUT (Tank1, 5, Tank_InOrder, 1000, 0)
Selects an input tank from among several tanks based on a selection rule. To use this function, you must list all tanks included in the selection together in the Location module.
<First Tank>
The name or location index number of the starting tank in the range.
<Number of Tanks>
The number of tanks in the selection range (limit 10).
<Selection Rule>
The rule for making the selection may be one of the following:
Tank_InOrder (selects the first blocked tank encountered)
Tank_LongestBlocked (selects the tank blocked the longest)
<Minimum Level>
The minimum level of the input tank before considering it for selection. If the tank must be full before considering it for an input source, enter 0.
<Product Type>
An integer specifying the required value for the Product array in order to select the tank. Enter 0 if the tank selection requires no product type match.
A tanker arrives at a pick up station to load from one of 5 tanks depending on which tank has been full the longest. The tanker will fill from a partial tank if the tank has any contents at all (at least .1 gallons). To model the tank selection, define the following operation logic for Tanker at PickUpStation:
INT Selected_Tank
Selected_Tank=Tank_SelectInput(Tank1, 5, Tank_LongestBlocked, .1, 0)
See Also
Selecting from Multiple Input or Output Tanks.
![]() |
© 2012 ProModel Corporation • 556 East Technology Avenue • Orem, UT 84097 • Support: 888-776-6633 • www.promodel.com |